(1) Field of the Invention
The present invention relates to a data processing system at least a portion of which operates under control of an object-oriented program (a program constructed in the manner of object-oriented programming), and to a process and an apparatus for setting inheritance coupling information in a data processing system containing an object-oriented system. in addition, the present invention relates to a process for executing a function in a data processing system containing an object-oriented system. Further, the present invention relates to an article of manufacture which, when used with a computer, directs the computer to execute a process for setting inheritance coupling information in a data processing system containing an object-oriented system.
(2) Description of the Related Art
Operations of an object-oriented system, i.e., a data processing system which operates under control of an object-oriented program, are performed by a plurality of objects, and each object is created from a class as an instance of the class. A plurality of classes are defined in an object-oriented system, and one or more objects can be created from each class. At least one member field (variable) and at least one member function (method) are defined as features of each class. An inheritance relationship can be established between two of the plurality of classes, where one of the two classes is called an ancestor or a parent, and the other is called a descendent or a child. The ancestor can further has its ancestor, and the above descendent can further has its descendent. Thus, an inheritance hierarchy can be established among the plurality of classes of in the object-oriented system. In the above inheritance hierarchy, each descendent may have one or more ancestors. When a descendent has only one ancestor, the inheritance relationship is called a single inheritance, and when a descendent has more than one ancestor, the inheritance relationship is called a multiple inheritance. Each descendent inherits all of the features of its ancestor(s).
When an object as an instance of one of the classes in the inheritance hierarchy receives a message requesting an execution of a member function, and the member function is not defined for the class to which the object belongs to, the object looks up the methods of the ancestors of the class to which the object belongs to, and delegates the execution of the member function to one of the ancestors where the member function requested by the message is defined.
Conventionally, the inheritance hierarchy is a fixed structure, i.e., the inheritance relationships in the inheritance hierarchy cannot be changed unless the object-oriented program per se, in which the inheritance relationships are defined, is changed.
Generally, the environment of the object-oriented system will vary. However, the above conventional object-oriented system cannot be dynamically changed corresponding to the variation in the environment.